package com.yxq.mdt.app.modules.auction.ui;

import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.yxq.mdt.app.R;
import com.yxq.mdt.app.base.BaseActivity;
import com.yxq.mdt.app.modules.auction.bean.HonorValueBean;
import com.yxq.mdt.app.modules.auction.model.AuctionModel;
import com.yxq.mdt.app.net.ApiModel;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 贡献值说明
 */
public class BecomeTeamContributionAc extends BaseActivity {


    @BindView(R.id.tv_contribution_number)
    TextView tvContributionNumber;

    @Override
    public int getLayoutId() {
        return R.layout.activity_become_team_contribution;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData(@Nullable Bundle savedInstanceState) {
        status();
    }

    /**
     * 收益状态
     */
    private void status() {
        AuctionModel.getHonorValue(new ApiModel.CommonCallback<HonorValueBean>() {
            @Override
            public void onSuccess(HonorValueBean honorValueBean) {
                tvContributionNumber.setText(String.format("您当前累计贡献值：%.2f", honorValueBean.getContribute_val()));

            }

            @Override
            public void onError(String errMsg) {

            }
        });
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
